3.153 \(\int \sec ^3(e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=70 \[ \frac {(4 a+3 b) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {(4 a+3 b) \tan (e+f x) \sec (e+f x)}{8 f}+\frac {b \tan (e+f x) \sec ^3(e+f x)}{4 f} \]

[Out]

1/8*(4*a+3*b)*arctanh(sin(f*x+e))/f+1/8*(4*a+3*b)*sec(f*x+e)*tan(f*x+e)/f+1/4*b*sec(f*x+e)^3*tan(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4046, 3768, 3770} \[ \frac {(4 a+3 b) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {(4 a+3 b) \tan (e+f x) \sec (e+f x)}{8 f}+\frac {b \tan (e+f x) \sec ^3(e+f x)}{4 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^3*(a + b*Sec[e + f*x]^2),x]

[Out]

((4*a + 3*b)*ArcTanh[Sin[e + f*x]])/(8*f) + ((4*a + 3*b)*Sec[e + f*x]*Tan[e + f*x])/(8*f) + (b*Sec[e + f*x]^3*
Tan[e + f*x])/(4*f)

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4046

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> -Simp[(C*Cot[
e + f*x]*(b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[(C*m + A*(m + 1))/(m + 1), Int[(b*Csc[e + f*x])^m, x], x]
/; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] &&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\frac {b \sec ^3(e+f x) \tan (e+f x)}{4 f}+\frac {1}{4} (4 a+3 b) \int \sec ^3(e+f x) \, dx\\ &=\frac {(4 a+3 b) \sec (e+f x) \tan (e+f x)}{8 f}+\frac {b \sec ^3(e+f x) \tan (e+f x)}{4 f}+\frac {1}{8} (4 a+3 b) \int \sec (e+f x) \, dx\\ &=\frac {(4 a+3 b) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {(4 a+3 b) \sec (e+f x) \tan (e+f x)}{8 f}+\frac {b \sec ^3(e+f x) \tan (e+f x)}{4 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 54, normalized size = 0.77 \[ \frac {(4 a+3 b) \tanh ^{-1}(\sin (e+f x))+\tan (e+f x) \sec (e+f x) \left (4 a+2 b \sec ^2(e+f x)+3 b\right )}{8 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^3*(a + b*Sec[e + f*x]^2),x]

[Out]

((4*a + 3*b)*ArcTanh[Sin[e + f*x]] + Sec[e + f*x]*(4*a + 3*b + 2*b*Sec[e + f*x]^2)*Tan[e + f*x])/(8*f)

________________________________________________________________________________________

fricas [A]  time = 0.51, size = 95, normalized size = 1.36 \[ \frac {{\left (4 \, a + 3 \, b\right )} \cos \left (f x + e\right )^{4} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (4 \, a + 3 \, b\right )} \cos \left (f x + e\right )^{4} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left ({\left (4 \, a + 3 \, b\right )} \cos \left (f x + e\right )^{2} + 2 \, b\right )} \sin \left (f x + e\right )}{16 \, f \cos \left (f x + e\right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/16*((4*a + 3*b)*cos(f*x + e)^4*log(sin(f*x + e) + 1) - (4*a + 3*b)*cos(f*x + e)^4*log(-sin(f*x + e) + 1) + 2
*((4*a + 3*b)*cos(f*x + e)^2 + 2*b)*sin(f*x + e))/(f*cos(f*x + e)^4)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*((-4*a-3*b)/32*ln(abs(sin(f*x+exp(1))-1))-(-4*a-3*b)/32*ln
(abs(sin(f*x+exp(1))+1))-(4*sin(f*x+exp(1))^3*a+3*sin(f*x+exp(1))^3*b-4*sin(f*x+exp(1))*a-5*sin(f*x+exp(1))*b)
*1/16/(sin(f*x+exp(1))^2-1)^2)

________________________________________________________________________________________

maple [A]  time = 1.03, size = 98, normalized size = 1.40 \[ \frac {a \tan \left (f x +e \right ) \sec \left (f x +e \right )}{2 f}+\frac {a \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2 f}+\frac {b \left (\sec ^{3}\left (f x +e \right )\right ) \tan \left (f x +e \right )}{4 f}+\frac {3 b \sec \left (f x +e \right ) \tan \left (f x +e \right )}{8 f}+\frac {3 b \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^3*(a+b*sec(f*x+e)^2),x)

[Out]

1/2/f*a*tan(f*x+e)*sec(f*x+e)+1/2/f*a*ln(sec(f*x+e)+tan(f*x+e))+1/4*b*sec(f*x+e)^3*tan(f*x+e)/f+3/8*b*sec(f*x+
e)*tan(f*x+e)/f+3/8/f*b*ln(sec(f*x+e)+tan(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 97, normalized size = 1.39 \[ \frac {{\left (4 \, a + 3 \, b\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (4 \, a + 3 \, b\right )} \log \left (\sin \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left ({\left (4 \, a + 3 \, b\right )} \sin \left (f x + e\right )^{3} - {\left (4 \, a + 5 \, b\right )} \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1}}{16 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

1/16*((4*a + 3*b)*log(sin(f*x + e) + 1) - (4*a + 3*b)*log(sin(f*x + e) - 1) - 2*((4*a + 3*b)*sin(f*x + e)^3 -
(4*a + 5*b)*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f*x + e)^2 + 1))/f

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 78, normalized size = 1.11 \[ \frac {\mathrm {atanh}\left (\sin \left (e+f\,x\right )\right )\,\left (\frac {a}{2}+\frac {3\,b}{8}\right )}{f}-\frac {{\sin \left (e+f\,x\right )}^3\,\left (\frac {a}{2}+\frac {3\,b}{8}\right )-\sin \left (e+f\,x\right )\,\left (\frac {a}{2}+\frac {5\,b}{8}\right )}{f\,\left ({\sin \left (e+f\,x\right )}^4-2\,{\sin \left (e+f\,x\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(e + f*x)^2)/cos(e + f*x)^3,x)

[Out]

(atanh(sin(e + f*x))*(a/2 + (3*b)/8))/f - (sin(e + f*x)^3*(a/2 + (3*b)/8) - sin(e + f*x)*(a/2 + (5*b)/8))/(f*(
sin(e + f*x)^4 - 2*sin(e + f*x)^2 + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \sec ^{3}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**3*(a+b*sec(f*x+e)**2),x)

[Out]

Integral((a + b*sec(e + f*x)**2)*sec(e + f*x)**3, x)

________________________________________________________________________________________